/*******************************************
 * Copyright 2007 Aphrodite Framework for javaME .
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the GNU Public License v2.0
 * which accompanies this distribution, and is available at
 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * Email : owner@aphroditeme.dev.java.net
 * Contributors:
 *     Kent Elton - initial API and implementation
 *******************************************/

package com.aphrodite.extns.location;

public class LocationUtils {
	private static final double knotsToKm = 1.852;

	/**
	 * Convert kilometers to nautical miles .
	 * 
	 * @param km
	 * 
	 * @return
	 */
	public static float kmToKnots(float km) {
		return (float) (km / knotsToKm);
	}

	/**
	 * Convert meters/second into kilometers/hour.
	 * 
	 * @param ms
	 *            The value to convert.
	 * @return in kilometers/hour.
	 */
	public static double msToKmh(double ms) {
		return ms * 3.6;
	}
}
